//
//  ADError.swift
//  ADKit
//
//  Created by Adoma on 2020/10/22.
//

import Foundation

public enum ADError: Error, LocalizedError {
        
    //MARK: 系统错误
    case notAuthorization
    
    //MARK: 接口错误
    case systemError
    case networkError
    
    case downloadError
    
    case error(message: String)
    
    public var errorDescription: String? {
        switch self {
        case .notAuthorization:
            return "notAuthorization"
        case .systemError:
            return "systemError"
        case .networkError:
            return "无网络连接"
        case .downloadError:
            return "下载出错"
        case .error(let msg):
            return msg
        }
    }
    
}

